import QtQuick 2.0

// 不截断focus事件,立刻传递给自己child,从下向上找到第一个focus=true的child,把focus事件传给它
FocusScope {
    property alias input: input
    property alias txt: input.text

    width: 150
    height: 25

    Rectangle {
        anchors.fill: parent
        color: "lightsteelblue"
        border.color: "gray"
    }

    TextInput {
        id: input
        anchors.fill: parent
        anchors.margins: 5
        focus: true
        text: "Please Input:"
        color: "blue"
    }
}
